package com.david.client.ui;

import com.google.gwt.user.client.ui.Widget;
import com.gwtext.client.widgets.layout.ContentPanel;

public class CentralFrame extends ContentPanel {
	private Widget content = null;
	public CentralFrame() {
		super("center-container");
	}
	
	public void setWidget(Widget widget){
		if(content != null){
			try{
				remove(content);
			}catch(Exception e){
				//ignore
			}
		}
		
		content = widget;
		add(widget);
	}
}
